<?php defined('_JEXEC') or die('Restricted access'); ?>

<h1 class="componentheading"><?php echo JText::_( 'Show Necrology:' ) . " " . $this->necro->abbr . " " . $this->necro->fname ." " . $this->necro->lname ?> </h1>


		<table align="center">
		<?php if(!empty($this->necro->photo)) : ?>
		<tr>
			<td colspan='2' align='center'>
				<img src='<?php echo JURI::base(). 'media/congregation/profiles/originals/' .  $this->necro->photo->filename ?>' border="0"/>
			</td>
		</tr>
		<?php endif; ?>		
		<tr>
			<th width="200" align="right" class="key">
				<label for="name">
					<?php echo JText::_( 'Name' ); ?>:
				</label>
			</th>
			<td>
				<?php echo $this->necro->abbr . " " . $this->necro->fname . "  <b>" . $this->necro->lname . "</b>" ?>
			</td>
		</tr>
<?php

	$b_label[0] = JText::_('Birth');
	$b_label[1] = JText::_('Entrance');
	$b_label[2] = JText::_('Novitiate');
	$b_label[3] = JText::_('First Profession');
	$b_label[4] = JText::_('Final Vows');
	$b_label[5] = JText::_('Ordination');

	$b_day[0] = substr($this->necro->bdate, 8, 2);
	$b_month[0] = substr($this->necro->bdate, 5, 2);
	$b_year[0] = substr($this->necro->bdate, 0, 4);
	$b_place[0] = $this->necro->bplace;

	$b_day[1] = substr($this->necro->edate, 8, 2);
	$b_month[1] = substr($this->necro->edate, 5, 2);
	$b_year[1] = substr($this->necro->edate, 0, 4);
	$b_place[1] = $this->necro->eplace;

	$b_day[2] = substr($this->necro->ndate, 8, 2);
	$b_month[2] = substr($this->necro->ndate, 5, 2);
	$b_year[2] = substr($this->necro->ndate, 0, 4);
	$b_place[2] = $this->necro->nplace;

	$b_day[3] = substr($this->necro->vdate, 8, 2);
	$b_month[3] = substr($this->necro->vdate, 5, 2);
	$b_year[3] = substr($this->necro->vdate, 0, 4);
	$b_place[3] = $this->necro->vplace;

	$b_day[4] = substr($this->necro->fdate, 8, 2);
	$b_month[4] = substr($this->necro->fdate, 5, 2);
	$b_year[4] = substr($this->necro->fdate, 0, 4);
	$b_place[4] = $this->necro->fplace;

	$b_day[5] = substr($this->necro->odate, 8, 2);
	$b_month[5] = substr($this->necro->odate, 5, 2);
	$b_year[5] = substr($this->necro->odate, 0, 4);
	$b_place[5] = $this->necro->oplace;

?>
<? for($m=0; $m<=5; $m++): ?>
<?php if($b_year[$m] != '0000'):?>
  <tr>
  <th align="right" class="key">
   <label for='b_day[]'> <?php echo $b_label[$m] ?>:</label>
  </th>
  <td valign='top'>
	<?php if($b_day[$m] > 0) echo $b_day[$m] . "/" . $b_month[$m] . "/" . $b_year[$m] ?>
   <?php if($b_place[$m]) echo " - " . $b_place[$m] ?>
	</td>
 </tr>

<?php endif; ?> 
 <?php endfor; ?>		
		<tr>
			<th width="200" align="right" class="key">
				<label for="ordering">
					<?php echo JText::_( 'Trepassed on' ); ?>:
				</label>
			</th>
			<td>
<?php

	echo substr($this->necro->ddate, 8, 2) . '/'  . substr($this->necro->ddate, 5, 2) . '/' . substr($this->necro->ddate, 0, 4);
	
?>			<?php if($this->necro->dplace) echo " - " . $this->necro->dplace ?>
			</td>
		</tr>
		<tr>
			<td valign='top'></td>
			<td valign='top'>
			<?php echo $this->necro->texte ?>
			</td>
		</tr>
	</table>

</div>
<div class="clr"></div>

